#ifndef __ALTAIR_IO_GETCH_H__
#define __ALTAIR_IO_GETCH_H__

#include <types.h>

/**
 *  getch()
 *  pocka na stisk klavesy, vrati jeji ASCII hodnotu
 */
unsigned int getch() {
  unsigned int result;
  int r_bp;

  asm push bp;
  asm pop r_bp;

  asm mov ax, 0x00;
  asm mov bx, r_bp;
  asm int OSINT;

  return result;
}

#endif
